package lumis.service.wsrp.consumer;

import java.util.Properties;

import com.sun.portal.wsrp.common.stubs.v2.PortletDescription;

import lumis.portal.PortalException;

/**
 * Interface for portlet service manager.
 *
 * @version $Revision: 13092 $ $Date: 2011-05-28 18:19:06 -0300 (Sat, 28 May 2011) $
 * @since 6.0.0
 */
public interface IPortletServiceManager
{
	/**
	 * Returns the portlet name.
	 * @param portletHandle	the portlet handle.
	 * @return				the portlet name.
	 * @throws PortalException
	 */
	public String getPortletName(String portletHandle)
					throws PortalException;
	
	/**
	 * Returns the description from portlet.
	 * @param portletHandle	the portlet handle.
	 * @return				the description.
	 * @throws PortalException
	 */
	public String getDescriptionFromPortlet(String portletHandle)
					throws PortalException;
	
	/**
	 * Returns the portlet description.
	 * @param portletHandle		the portlet handle.
	 * @return					an instance of PortletDescription.
	 * @throws PortalException
	 */
	public PortletDescription getPortletDescription(String portletHandle) 
								throws PortalException;
	
	/**
	* Clones a portlet.
	* @param portletHandle		the portlet handle.
	* @param displayName		the cloned portlet display name.
	* @return the portletHandle of the cloned portlet.
	* @since 6.0.0
	*/
	public String clonePortlet(String portletHandle, String displayName)
					throws PortalException;
	
	/**
	* Returns the portlet properties.
	* @param producerEntityId	the producer entity id.
	* @param portletHandle		the portlet handle.
	* @return					the properties of the portlet.
	* @since 6.0.0
	*/
	public Properties getPortletProperties(
							String portletHandle)
						throws PortalException;
	
	
	/**
	* Removes the clone.
	* @param producerEntityId	the producer entity id.
	* @param portletHandle		the portlet handle.
	* @since 6.0.0
	*/	
	public void removeClone(
					String portletHandle)
		throws PortalException;
	
	/**
	* Sets the portlet properties.
	* @param producerEntityId	the producer entity id.
	* @param portletHandle		the portlet handle.
	* @param properties		the new properties.
	* @since 6.0.0
	*/
	public void setPortletProperties(
					String portletHandle,
					Properties properties)
				throws PortalException;

}